{config_load file=info.conf section="links"}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{#title#}</title>
{#css_style#}{#js_query#}{#js_getday#}
</head>
<body>
{include file="head.tpl"}
 <div class="waps">
       <div class="con">     
            <div  class="nopa">
            	<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
                    <div class="pbox">
					<!--左框架开始 -->
						{include file="user_left.tpl"}
						<!--左框架结束-->
						<div class="ls_rbox">
							<div class="am_title"><span class="lsfonts_r">个人信息</span></div>
							<div class="listers">
	                           	<table>
	                           		<tr>
                                        	<td  class="step_rulname" valign="middle">会员名:</td>
                                            <td class="step_rultxt" valign="middle">
                                            	{$udata.nick}
                                            	<span class="step_remark"></span>
                                            </td>
                                        </tr>
                                  	<tr>
                                  	<tr>
                                        	<td  class="step_rulname" valign="middle">姓名:</td>
                                            <td class="step_rultxt" valign="middle">
                                            	<input id="name" type="text"  class="step_txt" maxlength="20"  style="width:160px;" value="{$udata.name}"/>
                                            	<span class="step_remark"></span>
                                            </td>
                                      </tr>
                                      <tr>
                                        	<td  class="step_rulname" valign="middle">公司名称:</td>
                                            <td class="step_rultxt" valign="middle">
                                            	<input id="cname" type="text"  class="step_txt" maxlength="500"  style="width:570px;" value="{$udata.cname}"/>
                                            	<span class="step_remark"></span>
                                            </td>
                                       </tr>
                                       <tr>
                                        	<td  class="step_rulname" valign="middle">公司地址:</td>
                                            <td class="step_rultxt" valign="middle">
                                            	<input id="cadd" type="text"  class="step_txt" maxlength="500"  style="width:570px;" value="{$udata.cadd}"/>
                                            	<span class="step_remark"></span>
                                            </td>
                                       </tr>
                                      <tr>
                                        	<td  class="step_rulname" valign="middle">联系电话:</td>
                                            <td class="step_rultxt" valign="middle">
                                            	<input id="tel" type="text"  class="step_txt" maxlength="20"  style="width:160px;" value="{$udata.tel}"/>
                                            	<span class="step_remark"></span>
                                            </td>
                                       </tr>
                                      <tr>
                                        	<td  class="step_rulname" valign="middle">QQ:</td>
                                            <td class="step_rultxt" valign="middle">
                                            	<input id="qq" type="text"  class="step_txt" maxlength="20"  style="width:160px;" value="{$udata.qq}"/>
                                            	<span class="step_remark"></span>
                                            </td>
                                       </tr>
                                        <tr>
                                        	<td  class="step_rulname" valign="middle">MSN:</td>
                                            <td class="step_rultxt" valign="middle">
                                            	<input id="msn" type="text"  class="step_txt" maxlength="20"  style="width:160px;" value="{$udata.msn}"/>
                                            	<span class="step_remark"></span>
                                            </td>
                                       </tr>
                                       <tr>
                                        	<td  class="step_rulname" valign="top">自我描述:</td>
                                            <td class="uremark" valign="middle">
                                            	<textarea id="sr" class="step_textarea" style="width:570px; height:60px;" >{$udata.uremark}</textarea>
                                            	<span class="step_remark"></span>
                                            </td>
                                       </tr>
                                  </table>
                                   <table class="next_step" align="center"> 
									<tr> 
										<td><a href="javascript:modify();"><div class="next_btn">修 改</div></a></td></td>
										{if $user.nick=="admin"}
										<td><a href="../user/list.php"><span>返 回</span></a></td> 
										{else}
										<td><a href="../railway/list.php"><span>返 回</span></a></td> 
										{/if}
									</tr> 
									</table>
                            </div>
						</div>
						<!--右框架结束-->
					<div class="clear"></div>
</div></div></div></div>
<div id="test"></div>
{include file="foot.tpl"}
<script type="text/javascript">
{literal}
function modify(){
	var name=encodeURIComponent($.trim($("#name").attr("value")));
	var cname=encodeURIComponent($.trim($("#cname").attr("value")));
	var cadd=encodeURIComponent($.trim($("#cadd").attr("value")));
	var tel=encodeURIComponent($.trim($("#tel").attr("value")));
	var qq=encodeURIComponent($.trim($("#qq").attr("value")));
	var msn=encodeURIComponent($.trim($("#msn").attr("value")));
	var uremark=encodeURIComponent($.trim($("#sr").attr("value")));
	var params ={act:"modify",name:name,cname:cname,cadd:cadd,tel:tel,qq:qq,msn:msn,uremark:uremark};
	$.post('modify.php',params,function(data) {
		//$("#test").html(data);
		if(data=="100"){
			alert("修改成功！用户信息需要重新登录自动更新！");
		}else{
			alert(data);
		}
	});	
}
</script>{/literal}
</body>
</html>